package com.matt.foundation.vo;

import lombok.Data;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;

/**
 * 用来做批量统计
 */

@Data
public class IDCountVO {
    private String id;
    private BigInteger count;

    public static HashMap<String, Integer> toMap(List<IDCountVO> objectArrayList){
        HashMap<String, Integer> ret = new HashMap<>();

        objectArrayList.stream().forEach(k->{
            ret.put(k.getId(), k.getCount().intValue());
        });

        return ret;
    }
}
